package org.piwik.events
{
	import flash.events.ErrorEvent;
	import flash.events.Event;

	/**
	* The PiwikErrorEvent class represents error events that are dispatched by the Piwik engine.
	*/
	public class PiwikErrorEvent extends ErrorEvent
	{
		public static const INIT_ERROR:String = "piwikInitError";
		
		
		public function PiwikErrorEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false, text:String="You need to define 'setup' variable or call init() method before requests.", id:int=0)
		{
			super(type, bubbles, cancelable);
		}

		public override function toString( ):String 
		{
			return formatToString("PiwikErrorEvent", "type", "bubbles",	"cancelable", "text", "id", "eventPhase");
		}
		
	}
}